package org.duanyu.shopping_common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回状态码的枚举类
 */
@Getter
@AllArgsConstructor
public enum CodeEnum {
    //正常
    SUCCESS(200,"OK"),
    //系统异常
    SYSTEM_ERROR(500,"系统异常"),
    //业务异常
    PARAMETER_ERROR(601,"参数异常"),
    //添加商品级别异常
    INSERR_PRODUCT_TYPE(602,"3级商品类型不能添加子类型"),
    //删除商品类型异常
    DELETE_PRODUCT_TYPE(603,"该商品类型下有子类型，不能删除"),
    //文件上传异常
    UPLOAD_FILE_ERROR(604,"文件上传异常"),
    //验证码错误
    CODE_ERROR(605,"验证码错误"),
    //该手机号码已经注册过
    PHONE_HAS_ALIVE(606,"该手机号码已经注册过"),
    //该用户名已存在
    USERNAME_ALIVE(607,"该用户名已经存在"),
    //用户名或密码错误
    USERNAME_OR_PASSWORD_ERROR(608,"用户名或密码错误"),
    //手机号输入错误
    PHONENUMBER_ERROR(609,"手机号输入错误"),
    //手机号不存在
    PHONE_HAVENT(610,"手机号不存在"),
    //用户状态异常
    LOGIN_USER_STATUS_ERROR(611,"该用户状态异常"),
    //二维码生成异常
    QR_CODE_ERROR(612,"二维码生成异常"),
    //验签异常
    CHEKC_SIGN_ERROR(613,"支付宝验签异常"),
    //订单状态异常
    ORDER_STATS_ERROR(614,"订单状态异常"),
    //商品库存不足
    NO_STOCK_ERROR(615,"商品库存不足"),
    //订单不存在或订单超时
    ORDER_EXPIRED_ERROR(616,"订单不存在或订单不存在"),
    //邮件发送失败
    EMIL_SEND_ERROR(617,"邮件发送失败")
    ;
    private final Integer code;
    private final String message;

}
